import { DynamicModule, Global, Module } from '@nestjs/common';
import { ConfigService } from './config.service';

@Global()
@Module({
  providers: [ConfigService],
  exports:[ConfigService]
})
export class ConfigModule {
  static resgister(options:{path:string}):DynamicModule{
    return {
      module:ConfigModule,
      providers:[{provide:'test',useValue:options}],
      exports:['test']
    }
  }
}
